package com.github.llyb120.yaomq.server;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.locks.Condition;

/**
 * @Author: Administrator
 * @Date: 2020/9/14 11:44
 */
@Data
public class MessageBuffer {
    private String ack;
    private boolean response;
    private int status;
    private String method = "get";
    private String url;
    private Map<String, String> headers = new HashMap<>();
    private String body = "";
    private long expr;

    @JSONField(serialize = false)
    private Condition condition;

    public String getUrl() {
        if (url == null) {
            return "";
        }
        return url;
    }

}
